package com.smart.wap.app;

import com.alibaba.fastjson2.JSONObject;
import com.smart.common.entities.ajax.AjaxResult;
import com.smart.common.entities.constant.SmartConstant;
import com.smart.manager.system.repository.ConfigRepository;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author Administrator
 */

@Api(tags = "移动端-基础资料")
@RestController
@RequestMapping(SmartConstant.WAP_API_PREFIX + "basic")
@RequiredArgsConstructor
public class BasicController {

    private final ConfigRepository configRepository;


    @GetMapping(value = "kefu")
    @ApiOperation(value = "客服资料接口")
    public AjaxResult<JSONObject> readAgreement() {
        JSONObject jsonObject = configRepository.readCache(SmartConstant.KEFU_CFG);
        return AjaxResult.data(jsonObject);
    }


}
